<script type="text/javascript" src="/public/library/jquery/jquery.js"></script>
<style>
.loading {
    background: url(/public/library/jquery/images/spinner.gif) no-repeat center center
}

</style>
<link rel="stylesheet" href="/public/library/hvn/hgallery.css" type="text/css" media="screen" charset="utf-8" />
<script src="/public/library/hvn/jquery.hgallery.js" type="text/javascript"></script>

<script type="text/javascript"> 
$(function(){
    $("div.hgallery_wrapper").hgallery({
			itemsPerPage : 3,
			animationSpeed : 'normal', /* fast/normal/slow */
			/*item = li*/
            itemWidth: 75, /*not including border*/
            itemHeight: 65, /*pixels*/
            itemMargin: 3, /*left-right Margin for li */
            itemTopMargin: 2, /* margin from li to ul */
            itemBorderWidth: 2,
            urWrapperBorderWidth:2, /* border around the itemsPerPage list */
            mainImageSize: 'medium',
		});
	 $("#delete-submit").click(function(){
		var src = $("img.hgallery_main_image").attr("src");
		$("#img").val(src);
	 });
});
</script>

<div style="float:left"> <!--  form wrapper -->
<form  action="/en/file/index/delete-file" method="POST">

<div class="hgallery_wrapper" >
    <div class="hgallery_main_image_div" style="text-align:center">
           <img  src='' class="hgallery_main_image" />
           <input type ="hidden" id = "img" name = "img"value = "" />
    </div>
	<input type="submit"  value="<?=t(31) ?>" id="delete-submit" onclick="return confirm('<?=t(163)?>');" /> 
	<?=t(1001) ?><br/>
    <div class="hgallery_item_navigation"> 
        <a href="javascript:void()" class="hgallery_item_prev"><img src="/public/themes/prime/images/left/homepage/gallery/prev_gallery19x19.png" border=0 /></a>
        <a href="javascript:void()" class="hgallery_item_play"><img src="/public/themes/prime/images/left/homepage/gallery/play_gallery19x19.png" border=0 /></a>
        <a href="javascript:void()" class="hgallery_item_next"><img src="/public/themes/prime/images/left/homepage/gallery/last_gallery19x19.png" border=0 /></a>
        <a class="hgallery_item_stop" style="display:none"><img src="/public/themes/prime/images/left/homepage/gallery/stop_gallery19x19.png" border=0 /></a>
            <span class="imageIndex"></span>/<span class="imageTotal"></span>
    </div>

    <div class="ul_wrapper"> <!-- image li list ul -->
        <ul class="hgallery_ul">
            <?foreach ($this->viewParams['displayFiles'] as $f=>$ctime) :?>
            <?if (file_exists(APP_PATH . sprintf( $this->viewParams['base'], "xsmall") . $f)) :?>
                <li><img src="<?=sprintf($this->viewParams['base'], "xsmall") . $f?>"></li> 
            
            <?endif?>
            <?endforeach?>
        </ul>
    </div>
	
    <div style="border: 1px solid red;">
        <ul class="hgalery_page_navigation_ul">
            <li class="prev"><a href="#"><?=t(3) ?></a>
            </li>
            <li>
                    <span class="pageIndex"></span>/<span class="pageTotal"></span>
            </li>
            <li class="next"><a href="#"><?=t(4) ?></a>
            </li>
        </ul>                
    </div>
    
</div> <!-- hgallery -->

<input type ="hidden"  name = "c"    value = "<?=$this->viewParams['c'] ?>" />
<input type ="hidden"  name = "id"   value = "<?=$this->viewParams['id'] ?>" />
<input type ="hidden"  name = "t"     value = "<?=$this->viewParams['t'] ?>" />
<input type ="hidden"  name = "uid" value = "<?=$this->viewParams['uid'] ?>" />
</form>

</div> <!--  form wrapper -->

<div style= "float:left;width:250px" >
<? $count =0; ?>
 		<table >
 			<tr>
 			 <?foreach ($this->viewParams['displayFiles'] as $f=>$ctime) :?>
                <?if (file_exists(APP_PATH . sprintf( $this->viewParams['base'], "xsmall") . $f)) :?>
                   <td><img src="<?=sprintf($this->viewParams['base'], "xsmall") . $f?>"></td>
                   	<? $count++ ?>
                  	<?if ($count % 5 == 0): ?>
                		</tr>
                		<tr>
                	<?endif?>
                <?endif?>
            <?endforeach?>
 			</tr>
 		</table>
 </div>

